<?php
namespace app\model;

use think\Model;

class LinkSpace extends Model
{
    protected $table = 'so_link_space';

    # 获取链接空间
    public static function getLinkSpace ()
    {
        $result = self::alias('l')->leftjoin(['so_user'=>'u'],'l.uid = u.uid')->field(['l.lid','l.name','l.linknum','u.nick','u.hport','u.autograph'])
        ->order('l.link_order desc')->where('l.state',3)->select();
        if(!empty($result))
            return $result->toArray();
        return '';
    }

}
